import request from '@/utils/request'

/**
 * 获取微信sdk配置
 * @returns {*}
 */
export function getWechatConfig() {
  return request.get('/weixin/wechat/config', { url: location.href }, { login: false })
}

/**
 * 公众号授权登录
 * @returns {*}
 */
export function wechatAuth(code, spread, login_type) {
  return request.get('/auth/oauth/wechatLogin', { code, spread, login_type }, { login: false })
}
